<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/views1/DTD/views1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui">
	<ui:composition template="/views/layout/main.xhtml">
		<ui:define name="conteudo">
			<h:form id="formPrincipal">
				<div class="grid_18 div_48">
					<p:commandButton widgetVar="btn_Novo" styleClass="add-address" ajax="false" action="#{disciplinaBean.goCreate}" title="Cadastrar"/>
					<c:if test="#{disciplinaBean.disciplinaInstance.id > 0}">
					<p:commandButton widgetVar="btn_Editar" styleClass="edit-address" ajax="false" action="#{disciplinaBean.goEdit}" title="Editar" />
					<p:commandButton widgetVar="btn_Desistir" styleClass="cancel" immediate="true" ajax="false" action="#{disciplinaBean.desistir}" title="Desistir"  />
					</c:if>
					<p:commandButton widgetVar="btn_Buscar" styleClass="search-address" type="button" ajax="false" title="Buscar" onclick="promptBuscaDisciplina.show();" />
					<p:commandButton widgetVar="btn_Home" styleClass="home" ajax="false" action="#{disciplinaBean.goHome}" title="Home" />
				</div>

				<div class="grid_18 titulo">Disciplinas</div>

				<div class="grid_18">
					<p:messages id="messages"/>
				</div>

				<div class="grid_4 div-label">Código:</div>
				<div class="grid_14 div-campo">
					<p:inputText id="disciplina_codigo" disabled="true"
						widgetVar="disciplina_codigo" styleClass="input-mp"
						value="#{disciplinaBean.disciplinaInstance.codigo}" />
				</div>

				<div class="grid_4 div-label">Nome:</div>
				<div class="grid_14 div-campo">
					<p:inputText id="disciplina_nome" disabled="true"
						widgetVar="disciplina_nome" styleClass="input-mg"
						value="#{disciplinaBean.disciplinaInstance.nome}" />
				</div>

				<div class="grid_4 div-label">Carga Horária:</div>
				<div class="grid_14 div-campo">
					<p:inputText id="disciplina_cargaHoraria" disabled="true"
						widgetVar="disciplina_cargaHoraria" styleClass="input-mp"
						value="#{disciplinaBean.disciplinaInstance.cargaHoraria}" />
				</div>

				<div class="grid_4 div-label">Situação:</div>
				<div class="grid_14 div-campo">
					<p:inputText id="disciplina_situacao" disabled="true"
						widgetVar="disciplina_situacao" styleClass="input-mp"
						value="#{disciplinaBean.disciplinaInstance.situacao}" />
				</div>
				
				<div class="grid_4 div-label">Descrição:</div>
				<div class="grid_14 div-campo">
					<p:editor id="disciplina_descricao" disabled="true"
						widgetVar="disciplina_descricao" 
						value="#{disciplinaBean.disciplinaInstance.descricao}" />
				</div>
			</h:form>

			<!-- INCLUSAO DE OUTROS XHTMLs -->
			<ui:include src="/views/disciplinas/_promptBuscaDisciplina.xhtml" />
		</ui:define>
	</ui:composition>
</f:view>